<?php

namespace app\admin\model;

use app\common\model\TimeModel;

class EvaluationElist extends TimeModel
{

    protected $name = "evaluation_elist";

    protected $deleteTime = "delete_time";

    protected $json = ['fields','star_names','scores','evaluate'];
    // 设置JSON数据返回数组
    protected $jsonAssoc = true;
    public function evaluationTemplate()
    {
        return $this->belongsTo('\app\admin\model\EvaluationTemplate', 'template_id', 'id');
    }

    public function systemAdmin()
    {
        return $this->belongsTo('\app\admin\model\SystemAdmin', 'admin_id', 'id');
    }
    public function users()
    {
        return $this->belongsTo('\app\common\model\Users', 'users_id', 'users_id');
    }

    public function evaluationZhuiping()
    {
        return $this->hasMany('\app\admin\model\EvaluationZhuiping', 'eva_id', 'id');
    }
}